package cn.cheln.explorer.func.music;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.widget.Toast;

/**
 * Created by Administrator on 13-11-14.
 */
public class MusicCast extends BroadcastReceiver {

    @Override
    public void onReceive(Context context,Intent intent) {
//        artistName = intent.getStringExtra("artist");
//        album = intent.getStringExtra("album");
//        track = intent.getStringExtra("track");
        Boolean playing = intent.getBooleanExtra("playing",false);
        Long duration = intent.getLongExtra("duration",3000);
        Long position = intent.getLongExtra("position",1000);
        Toast.makeText(context, "playing: " + playing+" duration: "+duration+" position: "+position, Toast.LENGTH_LONG).show();
    }
}
